package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.album.client.impl.TrackInfoDegradeFeignClient;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.TrackInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 */
@FeignClient(value = "service-album", fallback = TrackInfoDegradeFeignClient.class)
public interface TrackInfoFeignClient {

    //查询当前购买声音的数据列表

    @GetMapping("api/album/trackInfo/findPaidTrackInfoList/{itemId}/{trackCount}")
    Result<List<TrackInfo>> findPaidTrackInfoList(@PathVariable(value = "itemId") Long itemId,
                                                  @PathVariable(value = "trackCount") Integer trackCount);

    //修改声音之回显数据（根据id查询数据）
    @GetMapping("/getTrackInfo/{id}")
    public Result<TrackInfo> getTrackInfo(@PathVariable(value = "id") Long id);

}